<?
$attributes = array('class' => 'email', 'id' => 'checknew');
    echo form_open('news/delscat', $attributes);?>

<table class="admindata">
    <thead>
        <tr>
            <th colspan="4"> <input type="submit" onclick="return verify_del();" name="btn_submit" value="Xóa">
                Hiện có
                <?=$num?>
                danh mục
                <?=$pagination?>
            </th>
        </tr>
        <tr>
            <th class="checkbox"><input type="checkbox" name="sa" id="sa" onclick="check_chose('sa', 'ar_id[]', 'checknew')" /></th>
            <th>Tên chuyên mục</th>
            <th>Alias</th>
            <th class="publish">Chức năng</th>
        </tr>
    </thead>
    <?
        $k=1;
        foreach($list as $rs):
        $listsub = $this->news->get_Parent($rs->category_id);
        ?>
    <tr class="row<?=$k?>">
        <td><input type="checkbox" name="ar_id[]" value="<?=$rs->category_id?>"></td>
        <td><?=$rs->lb_category?></td>
        <td><?//=$rs->Alias?></td>
        <td align="center"><?=icon_edit('news/editcat/'.$rs->category_id)?>
            <span id="publish<?=$rs->category_id?>"><?=icon_active("'news_category'","'category_id'",$rs->category_id,$rs->bl_active)?></span>
            <?=icon_del('news/delcat/'.$rs->category_id.'/'.(int)$this->uri->segment(4))?></td>
    </tr>
    <? if(count($listsub) > 0){?>
    <? foreach($listsub as $val):?>
    <tr class="row<?=$k?>">
        <td><input type="checkbox" name="ar_id[]" value="<?=$val->category_id?>"></td>
        <td style="padding-left: 30px;">|__
            <?=$val->lb_category?></td>
        <td></td>
        <td align="center"><?=icon_edit('news/editcat/'.$val->category_id)?>
            <span id="publish<?=$rs->category_id?>">
            <?=icon_active("'news_category'","'category_id'",$val->category_id,$val->bl_active)?>
            </span>
            <?=icon_del('news/delcat/'.$val->category_id.'/'.(int)$this->uri->segment(4))?></td>
    </tr>
    <?endforeach?>
    <?}?>
    <?
        $k=1-$k;
        endforeach;?>
    <tfoot>
    <td colspan="4"><input type="submit" onclick="return verify_del();" name="btn_submit" value="Xóa">
            Hiện có
            <?=$num?>
            danh mục
            <?=$pagination?></td>
        </tfoot>
</table>
<?=form_close()?>
